﻿<%@ Page Language="C#" AutoEventWireup="true" validaterequest="false"  CodeBehind="new1.aspx.cs" Inherits="AnyOffice.general.email.new1" %>

<%@ Register TagPrefix="fckeditorv2" Namespace="FredCK.FCKeditorV2" Assembly="FredCK.FCKeditorV2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>转发</title>
		<script src="/aspnet_client/core/function.js"></script>
		<script Language="JavaScript">
function CheckForm()
{
   if (document.Form1.ToId.value=="")
   { alert("请添加收件人！");
     return (false);
   }

   if (document.Form1.txtSubject.value=="")
   { alert("请填写邮件主题！");
     document.Form1.txtSubject.focus();
     return (false);
   }
   
   /*   
   var oEditor = FCKeditorAPI.GetInstance('txtContent');
   if(oEditor.GetHTML() == "")  
   { alert("邮件内容不能为空！");
     return (false);
   }
   */
   
 return true;
}

function CheckFile()
{
   if (document.Form1.fileAttach.value=="")
   { alert("请选择附件！");
     return (false);
   }   
   return true;	
}

function show_tr(tr_id, btn)
{
   var tr = document.getElementById(tr_id), str_hide="隐藏", str_add="添加";
   if(!tr)
      return;
   //alert(btn.innerText)
   if(tr.style.display=="none")
   {
      tr.style.display="";
      btn.innerText = str_hide+btn.innerText.substring(str_add.length,btn.innerText.length);
   }
   else
   {
      tr.style.display="none";
      btn.innerText = str_add+btn.innerText.substring(str_hide.length,btn.innerText.length);
   }
}
</script>
	</HEAD>
	<body class="bodycolor" topMargin="5">
		<form id="Form1" method="post" runat="server">
			<asp:Panel id="pnlMain" runat="server">
				<TABLE class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
					<TR>
						<TD class="Big"><IMG height="18" src="/images/menu/email.gif" width="22" align="absMiddle"><SPAN class="big3">
								转发邮件</SPAN>
						</TD>
					</TR>
				</TABLE>				
				<TABLE class="small" cellSpacing="1" cellPadding="2" width="85%" align="center" bgColor="#000000"
					border="0">
					<TR>
						<TD class="TableData" noWrap>收件人：</TD>
						<TD class="TableData">
							<asp:TextBox id="ToName" runat="server" TextMode="MultiLine" Rows="2" CssClass="BigStatic" Columns="55"
								ReadOnly="True"></asp:TextBox>
								<INPUT class="SmallButton" title="添加收件人" onclick="user_select('ToId','ToName')" type="button" value="添 加"
								name="button"> <INPUT class="SmallButton" title="清空收件人" onclick="clear_double('ToId','ToName')" type="button" value="清 空"
								name="button"> <INPUT id="ToId" type="hidden" name="ToId" runat="server">
								<br />
								<div style="height:20px;padding:5px 0px 2px 0px;"><a href="javascript:;" onclick="show_tr('tr_cc',this);">添加抄送</a> - <a href="javascript:;" onclick="show_tr('tr_bcc',this);">添加密送</a></div>
						</TD>
					</TR>
					<TR id="tr_cc" style="display:none;">
						<TD class="TableData" noWrap>抄送：</TD>
						<TD class="TableData">
							<asp:TextBox id="CopyToName" runat="server" TextMode="SingleLine" Rows="1" CssClass="BigStatic"
								Columns="50" ReadOnly="True"></asp:TextBox>
								<INPUT class="SmallButton" title="添加抄送人" onclick="user_select('CopyToId','CopyToName')" type="button" value="添 加"
								name="button"> <INPUT class="SmallButton" title="清空抄送人" onclick="clear_double('CopyToId','CopyToName')" type="button" value="清 空"
								name="button"> <INPUT id="CopyToId" type="hidden" name="CopyToId" runat="server">
						</TD>
					</TR>
					<TR id="tr_bcc" style="display:none;">
						<TD class="TableData" noWrap>密送：</TD>
						<TD class="TableData">
							<asp:TextBox id="SecretToName" runat="server" TextMode="SingleLine" Rows="1" CssClass="BigStatic"
								Columns="50" ReadOnly="True"></asp:TextBox>
								<INPUT class="SmallButton" title="添加暗送人" onclick="user_select('SecretToId','SecretToName')" type="button" value="添 加"
								name="button"> <INPUT class="SmallButton" title="清空暗送人" onclick="clear_double('SecretToId','SecretToName')" type="button" value="清 空"
								name="button"> <INPUT id="SecretToId" type="hidden" name="SecretToId" runat="server">
						</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>邮件主题：</TD>
						<TD class="TableData">
							<asp:TextBox id="txtSubject" runat="server" CssClass="BigInput" Columns="50"></asp:TextBox>
						</TD>
					</TR>
					<TR>
						<TD class="TableData" vAlign="top" noWrap>邮件内容：</TD>
						<TD class="TableData">
							<FCKeditorV2:FCKeditor id="txtContent" runat="server" Width="100%" Height="300px" ToolbarSet="Basic"></FCKeditorV2:FCKeditor>
						</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>附件：</TD>
						<TD class="TableData">
							<asp:Panel id="pnlAttach" runat="server" Visible="False">
								<asp:ListBox id="ltbFileList" runat="server" Rows="1"></asp:ListBox>
								<asp:button id="btnRemoveFile" runat="server" CssClass="SmallButton" Text="删除" onclick="btnRemoveFile_Click"></asp:button>
							</asp:Panel>
						</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>附件上传：</TD>
						<TD class="TableData"><INPUT class="SmallInput" id="fileAttach" type="file" size="26" name="fileAttach" runat="server">
							<asp:button id="btnAddFile" runat="server" CssClass="SmallButton" Text="添加" onclick="btnAddFile_Click"></asp:button>
						</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>提醒：</TD>
						<TD class="TableData">
							<asp:CheckBox id="ckbSms" runat="server" Text="使用内部短信提醒收件人" Checked="True"></asp:CheckBox>
							<asp:CheckBox id="ckbMobile" runat="server" Visible="False" Text="使用手机短信提醒收件人"></asp:CheckBox>
						</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>重要程度：</TD>
						<TD class="TableData">
							<asp:RadioButtonList id="rblImportant" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal">
								<asp:ListItem Value="0" Selected="True">一般</asp:ListItem>
								<asp:ListItem Value="1">重要</asp:ListItem>
								<asp:ListItem Value="2">非常重要</asp:ListItem>
							</asp:RadioButtonList>
						</TD>
					</TR>
					<TR class="TableControl" align="center">
						<TD noWrap colSpan="2">
							<asp:Button id="btnSend" runat="server" CssClass="BigButton" Text="立即发送" ToolTip="立即发送此邮件" onclick="btnSend_Click"></asp:Button>&nbsp;&nbsp;&nbsp;<INPUT class="BigButton" title="清空所输入的内容，重新撰写" onclick="location='new.aspx'" type="button"
								value="重填">&nbsp;&nbsp;
						</TD>
					</TR>
				</TABLE>
			</asp:Panel>
			<asp:Label id="lblMessage" runat="server"></asp:Label>
			<br>
			<br>
		</form>
	</body>
</HTML>

